//
//  HomeTable.m
//  FPTest
//
//  Created by zhaohong on 2017/11/22.
//  Copyright © 2017年 zhaohong. All rights reserved.
//

#import "HomeTable.h"
#import "HomeTableCell.h"
@implementation HomeTable

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    
    //初始化UI控件，cell的类名，xib名，以及cell的identifier保持一致
    HomeTableCell *cell = (HomeTableCell *)[tableView dequeueReusableCellWithIdentifier:@"HomeTableCell"];
    if (!cell) {
        cell = [[[NSBundle mainBundle]loadNibNamed:@"HomeTableCell" owner:self options:nil]lastObject];
    }
   
    cell.model = self.data[indexPath.row];
    return cell;
}


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    //进入下一个界面
    //push操作
    
    //取消cell被选中时的灰色状态
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    

}

@end
